﻿using DocumentFormat.OpenXml.Lite.Core.Interfaces;
using DocumentFormat.OpenXml.Lite.Xml;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Schema;
using System.Xml.Serialization;

namespace DocumentFormat.OpenXml.Lite.SpreadsheetML.Drawing
{
    [XmlRoot("graphicFrame", Namespace = Constants.Drawing)]
    public class GraphicFrame : XmlSerializable, IGraphicObject
    {
        [Optional]
        [XmlAttribute("macro", Form = XmlSchemaForm.Qualified)]
        public string Macro { get; set; }

        [Optional]
        [XmlAttribute("fPublished", Form = XmlSchemaForm.Qualified)]
        public Nullable<bool> PublishToServer { get; set; }

        [XmlElement("nvGraphicFramePr", Namespace = Constants.Drawing)]
        public GraphicFrameProperties Properties { get; set; }

        [XmlElement("xfrm", Namespace = Constants.Drawing)]
        public Transform2d Transformation { get; set; }

        [XmlElement("graphic", Namespace = Constants.Graphic)]
        public Graphic Graphic { get; set; }

        public GraphicFrame() { }
    }
}
